home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 16 / IOPROG_16.ISO / soft / macaxsdk / macsdk.hqx / ActiveX DR3 SDK / ActiveX SDK / Sample Containers / ActiveXApp / CActiveXInfo.cpp / CActiveXInfo.cpp
Encoding:
Text File  |  1997-07-01  |  2.1 KB  |  74 lines  |  [TEXT/CWIE]

  1. // =================================================================================
  2. //    CActiveXInfo.cp                    ⌐1996 Microsoft Inc. All rights reserved.
  3. // =================================================================================
  4.  
  5. #include <LView.h>
  6. #include "ActiveXAppConstants.h"
  7. #include "ActiveXAPI.h"
  8. #include "InfoAPI.h"
  9. #include "CActiveXInfo.h"
  10.  
  11.  
  12. #pragma mark -------------- Construction/Destruction ------------------------
  13.  
  14. // ---------------------------------------------------------------------------------
  15. //        Ñ CreateActiveXInfotream [static]
  16. // ---------------------------------------------------------------------------------
  17.  
  18. CActiveXInfo *
  19. CActiveXInfo::CreateActiveXInfoStream(
  20.     LStream    *inStream )
  21. {
  22.     return new CActiveXInfo( inStream );
  23. }
  24.  
  25.  
  26. // ---------------------------------------------------------------------------------
  27. //        Ñ CActiveXInfo(LStream*)
  28. // ---------------------------------------------------------------------------------
  29.  
  30. CActiveXInfo::CActiveXInfo(
  31.     LStream    *inStream )
  32.         : LView( inStream )
  33. {
  34. }
  35.  
  36.  
  37. // ---------------------------------------------------------------------------------
  38. //        Ñ ~CActiveXInfo
  39. // ---------------------------------------------------------------------------------
  40.  
  41. CActiveXInfo::~CActiveXInfo()
  42. {
  43. }
  44.  
  45.  
  46. // ---------------------------------------------------------------------------------
  47. //        Ñ SetUserCon
  48. // ---------------------------------------------------------------------------------
  49. void CActiveXInfo::SetUserCon(Int32    inUserCon)
  50. {
  51.     LPane::SetUserCon(inUserCon);
  52.     
  53.     char IDStr[64];
  54.     
  55.     AX_GetIDString(mUserCon, 0, kAXClassID, 64, IDStr);
  56.     SetDescriptorForPaneID(kClassID, CtoPstr(IDStr));
  57.  
  58.     AX_GetIDString(mUserCon, 0, kAXUserName, 64, IDStr);
  59.     SetDescriptorForPaneID(kUserName, CtoPstr(IDStr));
  60.  
  61.     AX_GetIDString(mUserCon, 0, kAXProgID, 64, IDStr);
  62.     SetDescriptorForPaneID(kProgID, CtoPstr(IDStr));
  63.  
  64.     AX_GetIDString(mUserCon, 0, kAXFragName, 64, IDStr);
  65.     SetDescriptorForPaneID(kFragName, CtoPstr(IDStr));
  66.     
  67.     AXPlatformPoint DefaultSize;
  68.     AX_GetDefaultSize(mUserCon, 0, &DefaultSize);
  69.     SetValueForPaneID(kPaneHeight, DefaultSize.v);
  70.     SetValueForPaneID(kPaneWidth, DefaultSize.h);
  71.  
  72. }
  73.  
  74.